<?php
class Mensaje extends AppModel {

	var $name = 'Mensaje';
	var $primaryKey = 'mensaje_id';
	var $validate = array(
		'mensaje_id' => array('numeric'),
		'fuente' => array('numeric'),
		'destino' => array('numeric'),
		'fecha' => array('date')
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	/*var $belongsTo = array(
			'ParentMensaje' => array('className' => 'Mensaje',
								'foreignKey' => 'mensaje_id',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			)
	);*/
	var $belongsTo = array(
			'fuente' => array('className' => 'User',
						'foreignKey' => 'fuente',
						'conditions' => '',
						'fields' => '',
						'order' => ''
			),
			'destino' => array('className' => 'User',
						'foreignKey' => 'destino',
						'conditions' => '',
						'fields' => '',
						'order' => ''
			)
			
	);
	
	/*var $hasOne = array(
			'destino' => array('className' => 'User',
						'foreignKey' => 'destino',
						'conditions' => '',
						'fields' => '',
						'order' => ''
			)
	);*/

	/*var $hasMany = array(
			'destino' => array('className' => 'User',
						'foreignKey' => 'destino',
						'conditions' => '',
						'fields' => '',
						'order' => ''
			)
	);*/

}
?>